package com.example.myapplication

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.Chronometer
import androidx.lifecycle.setViewTreeLifecycleOwner
import com.example.myapplication.View.MyChronometer

class LifeCyclesOneActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_life_cycles_one)
        val meter: MyChronometer = findViewById<MyChronometer>(R.id.meter)
//        meter.setViewTreeLifecycleOwner(this)
      lifecycle.addObserver(meter)

    }
}

